import request from '@/utils/request'

export function getArticleList(type) {
    return request({
        url: "/getAllArticle",
        method: "get",
        params: {
            'type': type
        }
    })
}
export function updateArticle(data) {
    return request({
        url: "/updateArticle",
        method: "put",
        data
    })
}
export function deleteArticle(id) {
    return request({
        url: "/deleteArticle",
        method: "delete",
        params: {
            'id': id
        }
    })
}
// 指定用户所有文章
export function getUserToArticleList(uid, type) {
    return request({
        url: "/article",
        method: "get",
        params: {
            'uid': uid,
            'type': type
        }
    })
}